// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_MST_SCHEDULE
// * CreateDate    : 2014-06-05 18:30:17
// * Creater       : CodeSmith
// * LastChangeDate: 2014-06-05 18:30:17
// * LastChanger   : 2014-06-05 18:30:17
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
	[Serializable]
	public partial class MstScheduleEntity : EntityBase
    {
        public MstScheduleTable TableSchema
        {
            get
            {
                return MstScheduleTable.Current;
            }
		}
		
		public MstScheduleEntity()
        {

        }
		
		public MstScheduleEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
			this.UpdatedBy = Convert.ToString(CommonFunctions.ToObject(dr["UPDATED_BY"]));
			this.UpdatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["UPDATED_DATE"]));
			this.UserNo = Convert.ToString(CommonFunctions.ToObject(dr["USER_NO"]));
			this.Type = Convert.ToInt32(CommonFunctions.ToObject(dr["TYPE"]));
			this.AllDay = Convert.ToInt32(CommonFunctions.ToObject(dr["ALL_DAY"]));
			this.LabelId = Convert.ToInt32(CommonFunctions.ToObject(dr["LABEL_ID"]));
			this.Location = Convert.ToString(CommonFunctions.ToObject(dr["LOCATION"]));
			this.StartDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["START_DATE"]));
			this.EndDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["END_DATE"]));
			this.Subject = Convert.ToString(CommonFunctions.ToObject(dr["SUBJECT"]));
			this.StatusId = Convert.ToInt32(CommonFunctions.ToObject(dr["STATUS_ID"]));
			this.Description = Convert.ToString(CommonFunctions.ToObject(dr["DESCRIPTION"]));
        }
		
		public MstScheduleEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
			this.UpdatedBy = Convert.ToString(CommonFunctions.ToObject(dr["UPDATED_BY"]));
			this.UpdatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["UPDATED_DATE"]));
			this.UserNo = Convert.ToString(CommonFunctions.ToObject(dr["USER_NO"]));
			this.Type = Convert.ToInt32(CommonFunctions.ToObject(dr["TYPE"]));
			this.AllDay = Convert.ToInt32(CommonFunctions.ToObject(dr["ALL_DAY"]));
			this.LabelId = Convert.ToInt32(CommonFunctions.ToObject(dr["LABEL_ID"]));
			this.Location = Convert.ToString(CommonFunctions.ToObject(dr["LOCATION"]));
			this.StartDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["START_DATE"]));
			this.EndDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["END_DATE"]));
			this.Subject = Convert.ToString(CommonFunctions.ToObject(dr["SUBJECT"]));
			this.StatusId = Convert.ToInt32(CommonFunctions.ToObject(dr["STATUS_ID"]));
			this.Description = Convert.ToString(CommonFunctions.ToObject(dr["DESCRIPTION"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return MstScheduleTable.Current;
            }
        }
		
		#region Perporty List
        [DataMember]
        public string Id
        {
            get { return Convert.ToString(GetData(MstScheduleTable.C_ID)); }
            set { SetData(MstScheduleTable.C_ID, value); }
        }
		
        [DataMember]
        public string CreatedBy
        {
            get { return Convert.ToString(GetData(MstScheduleTable.C_CREATED_BY)); }
            set { SetData(MstScheduleTable.C_CREATED_BY, value); }
        }
		
        [DataMember]
        public DateTime CreatedDate
        {
            get { return Convert.ToDateTime(GetData(MstScheduleTable.C_CREATED_DATE)); }
            set { SetData(MstScheduleTable.C_CREATED_DATE, value); }
        }
		
        [DataMember]
        public string UpdatedBy
        {
            get { return Convert.ToString(GetData(MstScheduleTable.C_UPDATED_BY)); }
            set { SetData(MstScheduleTable.C_UPDATED_BY, value); }
        }
		
        [DataMember]
        public DateTime UpdatedDate
        {
            get { return Convert.ToDateTime(GetData(MstScheduleTable.C_UPDATED_DATE)); }
            set { SetData(MstScheduleTable.C_UPDATED_DATE, value); }
        }
		
        [DataMember]
        public string UserNo
        {
            get { return Convert.ToString(GetData(MstScheduleTable.C_USER_NO)); }
            set { SetData(MstScheduleTable.C_USER_NO, value); }
        }
		
        [DataMember]
        public int Type
        {
            get { return Convert.ToInt32(GetData(MstScheduleTable.C_TYPE)); }
            set { SetData(MstScheduleTable.C_TYPE, value); }
        }
		
        [DataMember]
        public int AllDay
        {
            get { return Convert.ToInt32(GetData(MstScheduleTable.C_ALL_DAY)); }
            set { SetData(MstScheduleTable.C_ALL_DAY, value); }
        }
		
        [DataMember]
        public int LabelId
        {
            get { return Convert.ToInt32(GetData(MstScheduleTable.C_LABEL_ID)); }
            set { SetData(MstScheduleTable.C_LABEL_ID, value); }
        }
		
        [DataMember]
        public string Location
        {
            get { return Convert.ToString(GetData(MstScheduleTable.C_LOCATION)); }
            set { SetData(MstScheduleTable.C_LOCATION, value); }
        }
		
        [DataMember]
        public DateTime StartDate
        {
            get { return Convert.ToDateTime(GetData(MstScheduleTable.C_START_DATE)); }
            set { SetData(MstScheduleTable.C_START_DATE, value); }
        }
		
        [DataMember]
        public DateTime EndDate
        {
            get { return Convert.ToDateTime(GetData(MstScheduleTable.C_END_DATE)); }
            set { SetData(MstScheduleTable.C_END_DATE, value); }
        }
		
        [DataMember]
        public string Subject
        {
            get { return Convert.ToString(GetData(MstScheduleTable.C_SUBJECT)); }
            set { SetData(MstScheduleTable.C_SUBJECT, value); }
        }
		
        [DataMember]
        public int StatusId
        {
            get { return Convert.ToInt32(GetData(MstScheduleTable.C_STATUS_ID)); }
            set { SetData(MstScheduleTable.C_STATUS_ID, value); }
        }
		
        [DataMember]
        public string Description
        {
            get { return Convert.ToString(GetData(MstScheduleTable.C_DESCRIPTION)); }
            set { SetData(MstScheduleTable.C_DESCRIPTION, value); }
        }
		
		#endregion
	}
	
	
}	

